Imports System.IO


Class SqlFileTableProcessor
    Inherits TableProcessor

    Public Overrides Sub Initialize()

    End Sub

    Public Overrides Sub Process(ByVal xmlOrigen As FileInfo, ByVal ti As TableInfo)
        Dim sqlFilename As String
        sqlFilename = xmlOrigen.FullName.Remove(xmlOrigen.FullName.Length - xmlOrigen.Extension.Length) & ".sql"
        Console.WriteLine("Escribiendo " & sqlFilename)

        Dim tw As New StreamWriter(sqlFilename)
        ti.WriteCreate(tw)
        ti.WriteInserts(tw)
        tw.Close()
    End Sub

    Public Overrides Sub Finish()

    End Sub

End Class
